import axios from '../../axios'

/* 
 * 数据库备份还原模块
 */

// 数据库备份接口
export const databaseBackup = () => {
    return axios({
        url: '/kysj/user/databackup/dataBaseDump',
        method: 'post',
    })
}

// 数据库还原接口
export const databaseRestore = (sqlname) => {
    return axios({
        url: '/kysj/user/databackup/backup?sqlname='+sqlname,
        method: 'PUT',
    })
}

// 表查询接口
export const queryJob = (page,pageSize) => {
    return axios({
        url: '/kysj/user/databackup/findByPage?page='+page+'&pageSize='+pageSize,
        method: 'get',
    })
}

// 查询总量
export const count = () => {
    return axios({
        url: '/kysj/user/databackup/count',
        method: 'get',
    })
}

// 删除
export const deleteDatabackup = (sqlname) => {
    return axios({
        url: '/kysj/user/databackup/delete?sqlname=' + sqlname,
        method: 'delete',
    })
}